import os

file_path = 'aesTest/example.txt'
file_name = os.path.basename(file_path)
print(file_name)  # 输出: example.txt
